@extends('layouts.default')

@section('title', '')

@push('scripts')
<script src="{{ asset('lib/xm-select-v1.2.4/xm-select.js')}}"></script>
<script>
    layui.use(['layer','form','table','laytpl','laydate','element','laypage','upload'], function(){
        var layer = layui.layer;
        var form = layui.form;
        var table = layui.table;
        var laytpl = layui.laytpl;
        var laydate = layui.laydate;
        var element = layui.element;
        var laypage = layui.laypage;
        var upload = layui.upload;
        var xmDemo;
        var xmDemo2;
        var xmDemo3; //调取资料时间
        var xmDemo4; //岗位级别
        var xmDemo5; //参与老师
        var id = "{{request()->get('id',0)}}";
        var is_captain = 0; //1-考评组长 2- 考评成员
        var is_admin_role = 0; 
        var param = {}; 

        laydate.render({
            elem: '#check_start'
        });
        laydate.render({
            elem: '#check_end'
        });
        laydate.render({
            elem: '#submit_start'
        });
        laydate.render({
            elem: '#submit_end'
        });

    

        renderSelect(function(){
            //编辑
            if(id != 0){
                getCheckFirst({'id':id},function(res){
                    if(res.code == 1){
                        form.val("formTest", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值                     
                            'data_version_id': res.data.data_version_id,
                            'name': res.data.name,
                            'comment': res.data.comment,
                            'check_start': res.data.check_start,
                            'check_end': res.data.check_end,
                            'submit_start': res.data.submit_start,
                            'submit_end': res.data.submit_end,
                            'sum': res.data.sum,
                            'id': res.data.id,
                            'scale_id': res.data.scale_id,                         
                            'updated_at': res.data.updated_at,                         
                        });                      

                        $('#author_id').text(res.data.author_name);
          
                        //调取资料时间
                        xmDemo3.setValue(res.data.materials_array);
                        //上传文件
                        if(res.data.files_array.length){
                            var getTpl = demo.innerHTML
                                ,view = document.getElementById('files');
                                laytpl(getTpl).render(res.data.files_array, function(html){
                                view.innerHTML = html;                              
                            });
                        } 
                        
                        //考评组长  
                        if( typeof(res.data.leader_array) != "undefined" ){
                            var getTpl = demo2.innerHTML
                                ,view = document.getElementById('kpzz');
                                laytpl(getTpl).render(res.data.leader_array, function(html){
                                view.innerHTML = html;                              
                            });
                        } 
                        //考评成员 
                        if( typeof(res.data.members_array) != "undefined" ){
                            var getTpl = demo3.innerHTML
                                ,view = document.getElementById('kpcy');
                                laytpl(getTpl).render(res.data.members_array, function(html){
                                view.innerHTML = html;                              
                            });
                        } 
                        
                    }
                })
            }
            Object.assign(param, {"id": id});
            getList(1);
        });

        function getList(page){
            Object.assign(param,{"page":page,is_captain:is_captain,is_admin_role:is_admin_role});		        		        	
            getCheckTeachersList(param,function(res){		
                if(res.code == 1){
                       is_admin_role = res.data.is_admin_role; //是否是管理员
                    if(res.data.data.length>0){
                        is_captain = res.data.data[0].is_captain;
                    } 
                    let table_data = [];
                    if(is_captain == 1){
                        table_data = [ 
                        {type: 'checkbox'}
                        ,{field: 'username', title: '教师姓名',width:'7%',align:'center'}							                  							
                        ,{field: 'title_name', title: '职称',width:'13%',align:'center',sort:true}							                  							
                        ,{field: 'subject', title: '任教学科',width:'7%',align:'center'}								                  															          
                        ,{field: 'grade', title: '任教年级',width:'7%',align:'center'}								                  															          
                        ,{field: 'class', title: '班主任任班级',width:'8%',align:'center'}	
                        ,{field: '', title: '个人评分(排名)',width:'7%',align:'center',templet: function(d) {
                            if(d.check_score!==null){
                                if(d.check_score.is_scores_eq ==1){
                                    return '<span style="color:red" >'+d.check_score.scores+'</span>（'+d.ranks.gr_rank+'/'+d.ranks.rank_sum+'）';
                                }else{
                                    return d.check_score.scores+'（'+d.ranks.gr_rank+'/'+d.ranks.rank_sum+'）';
                                }
                            }else{
                                return 0+'（'+d.ranks.gr_rank+'/'+d.ranks.rank_sum+'）';
                            }                                             
                        }}							                  															                                															
                       ,{field: 'scores', title: '最终评分',width:'7%',align:'center',sort:true,templet: function(d) {
                            if(d.is_captain ==1){
                                if(d.is_scores_eq == 1){
                                    return '<span style="color:red" >'+d.scores+'</span>';
                                }else{
                                    return d.scores; 
                                } 
                            }else{
                                return 0;
                            }                                                                                                   
                        }}																
                       ,{field: 'average_score', title: '最终排名',width:'7%',align:'center',sort:true,templet: function(d) {
                            return d.ranks.ranks+'/'+d.ranks.rank_sum;                                                
                        }}
                       ,{field: '', title: '审核状态',width:'7%',align:'center',templet: function(d) {
                            if(is_admin_role==1){
                                if(d.is_check==1){
                                    return '已审核';
                                }else{
                                    return '<span style="color: #0e90d2;" >未审核</span>'; 
                                }
                            }else{
                                if(d.check_score === null){
                                    return '<span style="color: #0e90d2;" >未审核</span>'; 
                                }else{
                                    if(d.check_score.mark_scores==1){
                                        return '已审核';
                                    }else{
                                        return '<span style="color: #0e90d2;" >未审核</span>'; 
                                    }                                  
                                }
                            }                                                                            
                        }}																	
                       ,{field: '', title: '审核进度',width:'7%',align:'center',templet: function(d) {
                            return d.check_sums+'/'+d.checks.check_sum;                                                
                        }}														                       													
                       ,{field: '', title: '审核时间',width:'10%',align:'center',templet: function(d) {
                            return d.is_check == 1?d.check_time:'';                                               
                        }}														
                        ,{field: '', title: '操作',toolbar: '#barDemo',width:'20%',align:'center',fixed:'right'}
                        ];
                    }else{
                        table_data = [ 
                        {type: 'checkbox'}
                        ,{field: 'username', title: '教师姓名',width:'8%',align:'center'}							                  							
                        ,{field: 'title_name', title: '职称',width:'13%',align:'center',sort:true}							                  							
                        ,{field: 'subject', title: '任教学科',width:'8%',align:'center'}								                  															          
                        ,{field: 'grade', title: '任教年级',width:'8%',align:'center'}								                  															          
                        ,{field: 'class', title: '班主任任班级',width:'8%',align:'center'}	                       						                  															                                															
                        ,{field: 'scores', title: '个人评分',width:'8%',align:'center',sort:true,templet: function(d) {
                            if(d.check_score!==null){
                                if(d.check_score.is_scores_eq ==1){
                                    return '<span style="color:red" >'+d.check_score.scores+'</span>';
                                }else{
                                    return d.check_score.scores;
                                }                               
                            }else{
                                return 0;
                            }                                                                                                    
                        }}																
                       ,{field: 'average_score', title: '个人排名',width:'8%',align:'center',sort:true,templet: function(d) {
                            return d.ranks.gr_rank+'/'+d.ranks.rank_sum;                                                
                        }}
                       ,{field: '', title: '审核状态',width:'8%',align:'center',templet: function(d) {
                            if(d.check_score === null){                             
                                return '<span style="color: #0e90d2;" >未审核</span>'; 
                            }else{
                                if(d.check_score.mark_scores==1){
                                    return '已审核';
                                }else{
                                    return '<span style="color: #0e90d2;" >未审核</span>';
                                }                             
                            }                                                 
                        }}																	
                       ,{field: '', title: '审核进度',width:'8%',align:'center',templet: function(d) {
                            return d.check_sums+'/'+d.checks.check_sum;                                                
                        }}														                       													
                       ,{field: '', title: '审核时间',width:'10%',align:'center',templet: function(d) {
                            return d.is_check == 1?d.check_time:'';                                               
                        }}														
                        ,{field: '', title: '操作',toolbar: '#barDemo',width:'20%',align:'center',fixed:'right'}
                        ];
                    }
                    table.render({
                        elem: '#tablelist'
                        // ,toolbar: '#toolbarDemo'
                        // ,defaultToolbar:[]
                        ,data: res.data.data
                        ,limit:res.data.limit
                        ,skin:'nob'
                        ,even:true
                        ,id:'idTest'
                        ,autoSort:false
                        //,cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
                        ,cols: [table_data]
                    });
                   
                    $('#pageBar').empty();                     
                    if(res.data.total >0){
                        //分页
                        laypage.render({
                        elem: 'pageBar' //注意，这里的 test1 是 ID，不用加 # 号
                        ,count: [res.data.total] //数据总数，从服务端得到
                        ,curr: page
                        ,layout: ['limit', 'count', 'prev', 'page', 'next',  'skip']                               
                        ,limit:res.data.limit
                        ,limits:[10, 20, 30, 40, 50,100,200,500]
                        ,jump: function(obj, first) {
                                //首次不执行
                                if (!first) {
                                    Object.assign(param,{"limit":obj.limit});                                
                                    getList(obj.curr)
                                }
                            }
                        });
                    }                        
                }else {
                    layer.msg(res.msg, {icon: 5});
                }                                    
            })
        }

        // 查询
        form.on('submit(queryBtn)', function(data) {
            Object.assign(param, {
                    "search": data.field
            });
            delete param.scores;
            getList(1);
            return false; 
        });
       
        //重置
        $('button[type=reset]').click(function(){
            if(param.scores !== undefined) delete param.scores;
            if(param.ranks !== undefined) delete param.ranks;
            if(param.title_sort !== undefined) delete param.title_sort;
            $('#search-form')[0].reset();
            $('button[lay-filter=queryBtn]').click(); 
            return false;    
        })

        //触发排序事件 
        table.on('sort(tablelist)', function(obj){ //注：sort 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            if(obj.field == 'scores'){
                Object.assign(param, {scores:obj.field+'|'+obj.type});
                if(param.search !== undefined) delete param.search.sort;
            }else if(obj.field == 'average_score'){
                Object.assign(param, {ranks:obj.field+'|'+obj.type});
            }else if(obj.field == 'title_name'){
                Object.assign(param, {title_sort:obj.field+'|'+obj.type});
            }
            getList(1);   
        });

        //下拉框初始化
        async function renderSelect(callback){
             //获取学期
            await new Promise((resolve) => {
                getTermData({},function(res){
                    if(res.code == 1){
                        $('select[name=data_version_id]').empty();
                        $('select[name=data_version_id]').append('<option value="">请选择</option>');
                        for(var i in res.data){
                            $('select[name=data_version_id]').append('<option value="'+res.data[i].id+'">'+res.data[i].title+'</option>');
                        }
                        form.render(); 
                        //调取资料时间
                        xmDemo3 = xmSelect.render({
                            el: '#demo33',                            
	                        autoRow: true,
                            theme: {
                                color: '#2d8cf0',
                            },
                            model: {
                                label: {
                                    type: 'block',
                                    block: {
                                        //最大显示数量, 0:不限制
                                        showCount: 0,
                                        //是否显示删除图标
                                        showIcon: false,
                                    }
                                }
                            },
                            disabled:true,
                            prop: {
                                name: 'title',
                                value: 'id',
                            },
                            name:'materials_date',
                            layVerify: 'required',
                            layVerType: 'msg',
                            layReqText:'调取资料时间不能为空',
                            data: res.data
                        })
                        return resolve();
                    }
                })
            }) 

            //量表
            await new Promise((resolve) => {
                getCheckScale({},function(res){
                    if(res.code == 1){
                        $('select[name=scale_id]').append('<option value="">请选择</option>');
                        for(var i in res.data){
                            $('select[name=scale_id]').append('<option value="'+res.data[i].id+'">'+res.data[i].name+'</option>');
                        }
                        form.render(); 
                        return resolve();                             
                    }
                })
            })

            await new Promise((resolve) => {
                getDictionaryItem({'diccode': ['SUBJECT','GRADE','title_teacher']}, function (res){
                    if(res.code === 1) {  
                        let data = res.data;
                        for(var k in data) {                        
                            $('[data-role='+k+'List]').empty().append('<option value="">请选择</option>');
                            let d = data[k];
                            for (var i in d) {
                                if(k == 'title_teacher'){                                  
                                    $('[data-role='+k+'List]').append('<option value="'+d[i].selectKey+'">'+d[i].selectValue+'</option>');                                                                      
                                }else{
                                    $('[data-role='+k+'List]').append('<option value="'+d[i].optionId+'">'+d[i].selectValue+'</option>');
                                }                                
                            }
                        }
                        form.render();
                        return resolve();
                    }
                });
            }) 
            callback();
        }  

        table.on('tool(tablelist)', function(obj){ //注：tool 是工具条事件名，test 是 table 原始容器的属性 lay-filter="对应的值"
            var data = obj.data; //获得当前行数据
            var layEvent = obj.event; //获得 lay-event 对应的值（也可以是表头的 event 参数对应的值）
            var tr = obj.tr; //获得当前行 tr 的 DOM 对象（如果有的话）
     
            if(layEvent === 'zzSee'){     
                let url = "{{route('rating.check.zzSee')}}?id="+data.check_id+'&scale_id='+data.scale_id+'&user_id='+data.user_id+'&ct_id='+data.id;
                layer.open({
                    title:'查看',
                    type: 2, 
                    content: url,
                    area: ['100%', '100%']
                }); 
            }else if(layEvent === 'ccSee'){
                let url = "{{route('rating.check.ccSee')}}?id="+data.check_id+'&scale_id='+data.scale_id+'&user_id='+data.user_id+'&ct_id='+data.id;
                layer.open({
                    title:'查看',
                    type: 2, 
                    content: url,
                    area: ['100%', '100%']
                }); 
            }else if(layEvent === 'check'){
                let url = "{{route('rating.check.check')}}?id="+data.check_id+'&scale_id='+data.scale_id+'&user_id='+data.user_id+'&ct_id='+data.id+'&username='+data.username;            
                layer.open({
                    title:'审核',
                    type: 2, 
                    content: url,
                    area: ['100%', '100%']
                });          
            }else if(layEvent === 'up'){
                _sort($(this),'up',data);             
            }else if(layEvent === 'down'){
                _sort($(this),'down',data);
            }
        });

        //排序
        function _sort(obj,type,data){
            let this_sort_id = data.sort; //当前行排序id
            let this_id = data.id; //当前行id
            let this_index = obj.parent().parent().parent().attr('data-index'); //当前行索引
           
            let sort_id = 0; //排序行id
            let sort_s_id = 0; //排序行排序id
            let sort_index;  //排序行索引
           
            if(type == 'up'){ 
                sort_index = this_index-1;
            }else{
                sort_index = Number(this_index)+Number(1);
            }

            if(type == 'up' && this_index == 0){layer.msg('不能移动！');return false;}   
            if(type == 'down' && table.cache.idTest.length == sort_index){layer.msg('不能移动！');return false;} 
          
            sort_s_id = table.cache.idTest[sort_index].sort;
            sort_id = table.cache.idTest[sort_index].id; 

            let a = table.cache.idTest; //当前表格的缓存数据 

            let this_data = a[this_index];  //当前行数据        
            let sort_data = a[sort_index];  //排序行数据

            this_data.sort = sort_s_id;    //修改当前行排序
            sort_data.sort = this_sort_id; //修改排序行排序

            a[this_index] = sort_data; //交换数据
            a[sort_index] = this_data; //交换数据
       
            setCheckSort({this_sort_id:this_sort_id,this_id:this_id,sort_id:sort_id,sort_s_id:sort_s_id},function(res){
                if(res.code ==1){
                    table.reloadData('idTest',{data:a}); //数据重载
                }else{
                    layer.msg('出错了！');return false;
                }
            })
        }

        //导出
        $('#daochu').click(function(){
            var checkStatus = table.checkStatus('idTest');
            if(checkStatus.data.length == 0){
                layer.msg('请选择需要导出的数据！');return false;
            }
            checkTeacherExport({checkStatus:checkStatus,id:id},function(res){
                if(res.code == '1'){
                    exportsDel(res.data.file_name,'/download/zip/'+res.data.file_name);
                }else{
                    layer.msg(res.msg, {icon: 5,shift : 6});
                }
            })
        })

        //下载
        function exportsDel(showName,fileName){
            window.location.href = "{{route('download.FileDownloadDel')}}"+'?filename='+showName+'&file_url='+fileName;
        }
               
    });
</script>
<script id="demo" type="text/html">
    <ul style="line-height: 38px;"> 
        @{{#  layui.each(d, function(index, item){ }}
        <li >
            <a style="color:#0e90d2;" target="_blank" href="@{{item.url}}" >@{{item.file_name}} </a>
            <a style="color:#74B8FF" href="@{{item.url}}" download="@{{item.file_name}}" >
                <span class="icon pear-icon pear-icon-download" style="color:#74B8FF;margin-left:10px;" ></span>
            </a>
        </li> 
        @{{#  }); }}   
    </ul>
</script>
<script id="demo2" type="text/html">
@{{#  layui.each(d.all, function(k, v){ }}
      <span style="line-height: 38px;border: 1px solid #eee;padding: 10px;color:#0e90d2" >@{{v.name}}</span> 
@{{#  }); }}
</script>
<script id="demo3" type="text/html">
@{{#  layui.each(d.all, function(k, v){ }}
      <span style="line-height: 38px;border: 1px solid #eee;padding: 10px;color:#0e90d2" >@{{v.name}}</span> 
@{{#  }); }} 
</script>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="up"  title="上移"><i class="pear-icon pear-icon-direction-up"></i></a>
    <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="down"  title="下移"><i class="pear-icon pear-icon-direction-down"></i></a>
    @{{# if(d.is_captain !=0 && d.is_captain ==1){ }}
    <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="zzSee"  >查看</a>
    @{{# }else{ }}
    <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="ccSee"  >查看</a>
    @{{# } }} 

    <!-- @if(!empty($_GET['submit_text']) && $_GET['submit_text'] == '已结束')
        @{{# if(d.is_xz ==1 && d.status ==1){ }}
        <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="check"  >审核</a>
        @{{# }else{ }}
        <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs layui-btn-disabled" lay-event=""  >审核</a>
        @{{# } }} 
    @else
        @{{# if(d.is_check_role ==1 && d.status ==1){ }}
        <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="check"  >审核</a>
        @{{# }else{ }}
        <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs layui-btn-disabled" lay-event=""  >审核</a>
        @{{# } }} 
    @endif -->

    @{{# if(d.is_check_role ==1 && d.status ==1){ }}
    <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs" lay-event="check"  >审核</a>
    @{{# }else{ }}
    <a class="layui-btn layui-btn layui-btn-primary layui-border-blue layui-btn-xs layui-btn-disabled" lay-event=""  >审核</a>
    @{{# } }} 
</script>
@endpush

@section('content')
<style>
    .opt-panel{padding: 20px;}
    .panel-title h3{font-weight: 800;margin-bottom: 20px;}

    #add-form{padding: 20px 5px;}
    .opt-area{display: flex;flex-direction: row-reverse;padding: 10px 20px;margin-bottom: 20px;}
    .opt-area button{margin-left: 10px;}
</style>

<div class="layui-row">
    <div class="layui-panel opt-panel">
        <div class="panel-title">
            <h3>学年考核 - 基本信息</h3>
        </div>
        <form class="layui-form" action="" lay-filter="formTest">
            <div class="layui-row">
                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label"><i class="redstar">*</i>学年学期：</label>
                        <div class="layuik-input-inline">
                            <select disabled class="data_version_id" name="data_version_id" lay-filter="termList" data-role="termList" lay-verify="required" lay-reqText="学年学期不能为空"></select>
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label"><i class="redstar">*</i>名称：</label>
                        <div class="layuik-input-inline">
                            <input disabled type="text" name="name" required lay-verify="required" placeholder="请输入" lay-reqText="名称不能为空" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div> 

                <div class="layuik-form-item layuik-columns-two">

                    <div class="layuik-inline">
                        <label class="layuik-form-label"><i class="redstar">*</i>考核起止时间：</label>
                        <div class="layuik-input-inline" style="width:38%">
                            <input disabled type="text" name="check_start" id="check_start" required lay-verify="required" placeholder="请输入" lay-reqText="考核开始不能为空" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-form-mid" style="width: 2%;text-align: right;" >-</div>
                        <div class="layuik-input-inline" style="width:38.5%;">
                            <input disabled type="text" name="check_end" id="check_end" required lay-verify="required" placeholder="请输入" lay-reqText="考核结束不能为空" autocomplete="off" class="layui-input">
                        </div>
                    </div>   
                    <div class="layuik-inline">
                        <label class="layuik-form-label"><i class="redstar">*</i>调取资料时间：</label>
                        <div class="layuik-input-inline">
                        <div type="text" id="demo33"  class="xm-select-demo"></div>
                        </div>
                    </div>               
                </div>


                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label"><i class="redstar">*</i>考评量表：</label>
                        <div class="layuik-input-inline">
                            <select disabled  name="scale_id"  lay-verify="required" lay-reqText="考评量表不能为空"></select>
                        </div>
                    </div>
                </div> 

                <div class="layuik-form-item ">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">说明：</label>
                        <div class="layuik-input-inline" style="width: 85%;">
                        <textarea disabled name="comment" placeholder="请输入内容" class="layui-textarea"></textarea>
                        </div>
                    </div>              
                </div>

                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">相关材料：</label>
                        <div id="files" ></div>
                     
                        </div>                   
                    </div>  
                </div> 

                <div class="layuik-form-item layuik-columns-two">
                    <div class="layuik-inline">
                        <label class="layuik-form-label">创建人：</label>
                        <div class="layuik-input-inline">
                            <span style="line-height: 38px;border: 1px solid #eee;padding: 10px;" id="author_id"></span>
                        </div>
                    </div>
                    <div class="layuik-inline">
                        <label class="layuik-form-label">创建时间：</label>
                        <div class="layuik-input-inline">
                            <input disabled type="text" name="updated_at" id="updated_at" required lay-verify="required" placeholder="" lay-reqText="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                </div>


                

                <input type="hidden" name="id" value="" >
          
            </div>
            
            <!-- <div class="layui-row">
                <div class="opt-area">
                    <a href="javascript:history.go(-1);" ><button class="layui-btn layui-btn-primary" type="button">返回</button></a>
                    <button class="layui-btn layui-btn-primary" type="button"  id="formSave" style="color:#2d8cf0;" >保存</button>
                    <button class="layui-btn layui-btn-normal"  lay-submit lay-filter="formDemo">提交</button>
                </div> 
            </div> -->
        </form>
    </div>   
</div>

<div class="layui-row" style="margin-top:10px" >
    <div class="layui-panel opt-panel">
        <div class="panel-title">
            <h3>考核小组</h3>
        </div>
        <form class="layui-form" action="" >
            <div class="layuik-form-item ">
                <div class="layuik-inline">
                    <label class="layuik-form-label"><i class="redstar">*</i>考评组长：</label>
                    <div class="layuik-input-inline" style="width: 85%;">
                        <div id="kpzz"></div>
                        <!-- <span style="line-height: 38px;border: 1px solid #eee;padding: 10px;" ></span> -->
                    </div>
                </div>
            </div>

            <div class="layuik-form-item ">
                <div class="layuik-inline">
                    <label class="layuik-form-label"><i class="redstar">*</i>考评成员：</label>
                    <div class="layuik-input-inline" style="width: 85%;">
                        <div id="kpcy"></div>
                        <!-- <span style="line-height: 38px;border: 1px solid #eee;padding: 10px;" ></span> -->
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
  
<div class="layui-row" style="margin-top:10px" >
    <div class="layui-panel opt-panel">
        <div class="panel-title">
            <h3>教师列表</h3>
        </div>

        <div class="layui-card">
            <div class="layui-card-body">
                <div class="layui-row">    
                    <form class="layui-form" id="search-form" >   
                        <div class="layui-form-item">             
                            
                            <div class="layui-inline">
                                <label class="layui-form-label" >姓名:</label>
                                <div class="layui-input-inline">                  
                                    <input autocomplete="off" type="text" name="name" class="layui-input" placeholder="请输入">                
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label" >职称:</label>
                                <div class="layui-input-inline">                  
                                    <select data-role="title_teacherList" name="title"   lay-filter="" >
                                    </select>               
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label" >任教学科:</label>
                                <div class="layui-input-inline">                  
                                    <select data-role="SUBJECTList" name="subject"   lay-filter="" >
                                    </select>               
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label" >任教年级:</label>
                                <div class="layui-input-inline">                  
                                    <select data-role="GRADEList" name="grade"   lay-filter="" >
                                    </select>               
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label" >状态:</label>
                                <div class="layui-input-inline">                  
                                    <select data-role="" name="check_status"   lay-filter="" >
                                        <option value="">请选择</option>
                                        <option value="1">已审核</option>
                                        <option value="0">未审核</option>
                                    </select>                 
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label" >排序:</label>
                                <div class="layui-input-inline">                  
                                    <select data-role="" name="sort"   lay-filter="" >
                                        <option value="">请选择</option>
                                        <option value="scores|desc">按分数从高到低</option>
                                        <option value="scores|asc">按分数从低到高</option>
                                        <!-- <option value="title_level|asc">按职称排序</option> -->
                                    </select>                 
                                </div>
                            </div>

                            <div class="layui-inline" > 
                                <button lay-submit id="queryBtn" class="pear-btn pear-btn-md pear-btn-primary" lay-filter="queryBtn" >
                                    查询
                                </button>
                                <button type="reset" class="pear-btn pear-btn-md pear-btn-primary reset">
                                    重置
                                </button>
                                <button type="button" id="daochu" class="pear-btn pear-btn-md pear-btn-primary">
                                    下载
                                </button>
                            </div>
                     

                    </form>      
                </div>
            </div>
        </div>


        <div class="layui-card">

            <div class="layui-card-body">
                <table class="layui-table" id="tablelist" lay-filter="tablelist" ></table>
                <div class="pagebarbox" style="text-align: end"><div id="pageBar" class="pagebar"></div></div>
            </div>
        </div>
        
        <div class="layui-row">
                <div class="opt-area">
                    <a href="javascript:history.go(-1);" ><button class="layui-btn layui-btn-primary" type="button">返回</button></a>
             
                </div> 
            </div>
    </div>
</div>
@endsection